home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / pctchnqs / 1991 / number2 / l1.asm < prev    next >
Assembly Source File  |  1991-02-15  |  358b  |  18 lines

  1. ; Measures the effect of loading a byte register 2 cycles before
  2. ; using a register to address memory.
  3.     mov    bp,2    ;run the test code twice to make sure
  4.             ; it's cached
  5.     sub    bx,bx
  6. CacheFillLoop:
  7.     call    ZTimerOn ;start timing
  8.     rept    1000
  9.     mov    dl,cl
  10.     nop
  11.     mov    ax,[bx]
  12.     endm
  13.     call    ZTimerOff ;stop timing
  14.     dec    bp
  15.     jz    Done
  16.     jmp    CacheFillLoop
  17. Done:
  18.